package com.ruicar.afs.cloud.risk.tortoise.dto.notice.data;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import com.ruicar.afs.cloud.risk.api.enums.tortoise.GwtTortoiseFlowType;
import com.ruicar.afs.cloud.risk.api.enums.tortoise.GwtTortoisePrevResult;
import lombok.Data;

import java.util.Date;

/**
 * Description 预授信/新车预审
 * Author Peng Jinbo
 * Date 2020/07/21 17:33
 */
@Data
public class GwtTortoisePrevApproveNotice {

    /**
     * Flow type
     * 流程标识1：二手车预授信 2：预审批
     */
    @JSONField(name = "flowType",serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    @JsonProperty("flowType")
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    private GwtTortoiseFlowType flowType;

    /**
     * Prev credit result
     * 预审批结果
     */
    @JSONField(name = "precreditResult",serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    @JsonProperty("precreditResult")
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    private GwtTortoisePrevResult prevCreditResult;

    /**
     * Refuse reason
     * 预授信/预审批拒绝原因
     */
    @JSONField(name = "refuseReason")
    @JsonProperty("refuseReason")
    private String refuseReason;

    /**
     * Prev credit date
     * 预授信/预审批时间“yyyy-MM-dd”
     */
    @JSONField(name = "precreditDate" , format = "yyyy-MM-dd HH:mm:ss")
    @JsonProperty("precreditDate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date prevCreditDate;

    /**
     * Price limit
     */
    @JSONField(name = "priceLimit")
    @JsonProperty("priceLimit")
    private String priceLimit;

}
